package com.briup.exception;/*
 * @Description:
 * @Author: 枸男人
 * @Date: 2024/12/04/11:35
 * @LastEditors: 34866
 * @: 你说哥帅,哥笑了,因为哥笑起来更帅
 */
import com.briup.utils.ResultCode;
/**
 * 自定义service层异常类
 */
public class ServiceException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private ResultCode resultCode;

    public ServiceException(ResultCode resultCode) {
        this(resultCode.message());
        this.resultCode = resultCode;
    }

    private ServiceException(String message) {
        super(message);
    }

    public ResultCode getResultCode() {
        return resultCode;
    }

    public void setResultCode(ResultCode resultCode) {
        this.resultCode = resultCode;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }
}